﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Chinaer.Model.Entities
{
    /// <summary>
    /// 商家端是否阅读中心公告
    /// </summary>
    [Serializable]
    [DataContract]
    [Table("ShangJiaIsReadZhongXinTongGao")]
    public class Model_ShangJiaIsReadZhongXinTongGao : Model_Base
    {
        private string _id = string.Empty;
        /// <summary>
        /// 商家端阅读编号
        /// </summary>
        [DataMember]
        [Key]
        [Required]
        [Column("ID")]
        public string ID
        {
            get
            {
                if (string.IsNullOrEmpty(_id))
                {
                    _id = Guid.NewGuid().ToString().Replace("-", "");
                }
                return _id;
            }
            set
            {
                _id = value;
            }

        }
        /// <summary>
        /// 中心公告编号
        /// </summary>
        public string ZhongXinGongGaoID { get; set; }
        /// <summary>
        /// 商家编号
        /// </summary>
        public string ShangJiaID { get; set; }
        /// <summary>
        /// 是否阅读
        /// </summary>
        private bool _isRead = false;
        [DataMember]
        private DateTime? _readTime = DateTime.Now;
        /// <summary>
        /// 是否阅读
        /// </summary>
        [DataMember]
        public bool IsRead
        {
            get
            {
                return _isRead;
            }
            set
            {
                _isRead = value;
            }

        }
        /// <summary>
        /// 阅读时间
        /// </summary>
        public DateTime? ReadTime
        {
            get
            {
                return _readTime;
            }
            set
            {
                _readTime = value;
            }

        }


    }
}
